// import jsonp from 'common/js/jsonp'
import {
  CommendParam
} from './config'
import axios from 'axios'

// 获取歌词 服务器请求
export function getSonglyric(mid) {
  const url = 'api/lyric'

  const data = Object.assign({}, CommendParam, {
    loginUin: 0,
    hostUin: 0,
    needNewCode: 0,
    pcachetime: +new Date(),
    songmid: mid,
    format: 'json',
    platform: 'yqq.json'
  })

  return axios.get(url, {
    params: data
  }).then((res) => {
    return Promise.resolve(res.data)
  })
}
